
#ifndef __YELLOWJACKET_H
#define __YELLOWJACKET_H

//GLOBAL CONSTRAINTS
#define YJ_INTMAX 536870912 //2 ^ 29


#define YJ_EQ 0x1 
#define YJ_NE 0x2 
#define YJ_GT 0x3 
#define YJ_LT 0x4 


#define check_stack(x) ((int) *(task_ptr->op_stack - x) & 0x3)

#define pop() (*(--task_ptr->op_stack + 1))
#define push(x) while (task_ptr->op_stack + 1 >= task_ptr->op_stack_limit) \
                  grow_op_stack(); \
                (*(++task_ptr->op_stack) = x)


//Check for op stack overflow
#define check_arg(x) (x >= 0 && task_ptr->frame[- (x + 1)] > task_ptr->op_stack_start)
//Access argument from op stack, can read or write
#define get_arg(x) ((YJK_OBJECT) task_ptr->frame[- (x + 1)])



#endif
